package com.zkthink.ceres.member.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * @ClassName MemberCityClubTypeEnum
 * @Description: 会员类型
 * @Author ck
 * @Date 2021/1/21
 * @Version V1.0
 **/
@Getter
public enum MemberCityClubTypeEnum {

    PuTong_CityClub(1, "普通城市俱乐部"),
    YouXiu_CityClub(2, "优秀城市俱乐部"),
    ;

    private int code;

    private String desc;

    MemberCityClubTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static MemberCityClubTypeEnum getDscByType(Integer type) {
        for (MemberCityClubTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
